#include <stdio.h>
#include <string.h>
#include <stdlib.h>

char* str_concat(const char* p, const char* q) {
    char* d = (char*) malloc(strlen(p) + strlen(q) + 1);
    strcpy(d, p);
    strcat(d, q);
    return d;
}

int str_eq(const char* p, const char* q) {
    return strcmp(p, q) == 0 ? 1 : 0;
}

int str_ne(const char* p, const char* q) {
    return strcmp(p, q) != 0 ? 1 : 0;
}

int str_lt(const char* p, const char* q) {
    return strcmp(p, q) < 0 ? 1 : 0;
}

int str_le(const char* p, const char* q) {
    return strcmp(p, q) <= 0 ? 1 : 0;
}

int str_gt(const char* p, const char* q) {
    return strcmp(p, q) > 0 ? 1 : 0;
}

int str_ge(const char* p, const char* q) {
    return strcmp(p, q) >= 0 ? 1 : 0;
}

char* int2str(int n) {
    char* d = (char*)malloc(25);
    sprintf(d, "%d", n);
    return d;
}

char* float2str(double v) {
    char* d = (char*)malloc(25);
    sprintf(d, "%.2f", v);
    return d;
}